package com.lzh.others.designmode.strategymod;

/**
 * @Description: 创建上下文，并定义一个Strategy对象
 * @Author: LiuZiHao
 * @Date: 2022/11/7 11:30
 */
public class Context {
    private final Operation operation;

    public Context(Operation operation) {
        this.operation = operation;
    }

    public int getResult(int num1, int num2) {
        return operation.calculate(num1, num2);
    }
}
